export const getCurrentMenu = (menu, level) => {
  if (level > 1) {
    level--;
    const nextMenu = menu?.children?.find((item) => item.id == menu.active);
    return getCurrentMenu(nextMenu, level);
  } else {
    return menu;
  }
};